const { createWebAPIRequest } = require('../../util/util')
module.exports = [
  {
    /**
    * @api {get} /music/lyric [获取歌词]
    * @apiGroup Music
    * @apiPermission none
    * @apiParam {Number} id
    */
    url: '/music/lyric',
    request: (req, res) => {
      const cookie = req.get('Cookie') ? req.get('Cookie') : ''
      const data = {}
      const id = req.query.id
      createWebAPIRequest(
        'music.163.com',
        '/weapi/song/lyric?os=osx&id=' + id + '&lv=-1&kv=-1&tv=-1',
        'POST',
        data,
        cookie,
        musicReq => {
          res.send(musicReq)
        },
        err => res.status(500).send({ err })
      )
    }
  }
]
